home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _printapps / printapps / printers / !Printers / ps / PSfiles / PSprolog2 < prev    next >
Text File  |  1994-02-16  |  8KB  |  109 lines

  1. %% Main prologue file for the PostScript printer driver module.
  2. %% Version 4.00 first used with version 4.00 of the module
  3. /PDdict 200 dict def PDdict begin/BD{bind def}bind def/LD{load
  4. def}BD/LW/setlinewidth LD/St/stroke LD/T/translate LD/S/save LD/R/restore
  5. LD/GS/gsave LD/GR/grestore LD/CP/clippath LD/Cl/closepath LD/M/moveto
  6. LD/RM/rmoveto LD/L/lineto LD/B/curveto LD/I/index LD/SW/stringwidth
  7. LD/GCF/currentfont LD/GCM/currentmatrix LD/SCM/setmatrix LD/CCM/concatmatrix
  8. LD/ED{exch def}BD/Copies{/#copies ED showpage}BD/MP{400. div}BD/Fb{65536.
  9. div}BD/WM1 matrix def/WM2 matrix def/IM1 matrix def/UM{Fb 4 1 roll Fb 4 1
  10. roll Fb 4 1 roll Fb 4 1 roll 0. 0. WM1 astore concat}BD/Bx{4 copy 5 1 roll 4
  11. 2 roll 5 -1 roll M L L L Cl}BD/Cp{Bx clip newpath}BD/PS{72. 180. div dup
  12. scale newpath Cp[]0. setdash}BD/MC{0. 0. Cp}BD/G{255. div setgray}BD/C{255.
  13. div 3 1 roll 255. div 3 1 roll 255. div 3 1 roll setrgbcolor}BD/Eps 0.1 MP
  14. def/VSt{2 setlinecap 0 setlinejoin 2.000001 setmiterlimit 2. LW 0. Eps
  15. rlineto St}BD/VFl{Cl GS fill GR VSt}BD/Li{M L VSt}BD/Pt{M VSt}BD/Tr{M L L
  16. VFl}BD/Rc{Bx VFl}BD/Pr{6 copy M L L 5 -1 roll 4 -1 roll sub add 4 1 roll
  17. exch sub add exch L VFl}BD/Ln{dup mul exch dup mul add sqrt}BD/Cir{0. 360.
  18. arc}BD/VC{Ln Cir}BD/CS{VC VSt}BD/CF{VC VFl}BD/VA{2 copy Ln 5 1 roll exch
  19. atan 3 1 roll exch atan arc}BD/Ac{VA VSt}BD/Cd{VA VFl}BD/Sc{5 I 5 I M VA
  20. VFl}BD/VE{0. 5 1 roll WM1 astore WM2 GCM exch concat 0. 0. 1. Cir
  21. SCM}BD/ES{VE VSt}BD/EF{VE VFl}BD/Max{2 copy lt{exch}if pop}BD/DM{256. div 6
  22. 1 roll 256. div 6 1 roll Fb 256. div 6 1 roll Fb 256. div 6 1 roll Fb 256.
  23. div 6 1 roll Fb 256. div 6 1 roll WM1 astore concat}BD/SDM{256. div 6 1 roll
  24. 256. div 6 1 roll Fb 6 1 roll Fb 6 1 roll Fb 6 1 roll Fb 6 1 roll 6 copy WM1
  25. astore concat pop pop 0 0 IM1 astore pop}BD/IT{IM1 itransform}BD/CJ{2 I 0
  26. eq{Fb setmiterlimit}{pop}ifelse setlinecap setlinejoin}BD/WS 4096 string
  27. def/SMat matrix def/SS{div 3 1 roll div exch scale}BD/SM{1. exch div 0. 0.
  28. 1. 0. 0. SMat astore pop}BD/RC{WS 0 3 I put dup 1 gt{WS 1 3 I put dup 2
  29. gt{WS 2 3 I put WS 3 3 I put dup 4 gt{WS 4 WS 0 4 getinterval putinterval
  30. dup 8 gt{WS 8 WS 0 8 getinterval putinterval dup 16 gt{WS 16 WS 0 16
  31. getinterval putinterval dup 32 gt{WS 32 WS 0 32 getinterval putinterval dup
  32. 64 gt{WS 64 WS 0 64 getinterval putinterval dup 128 gt{WS 128 WS 0 128
  33. getinterval putinterval dup 256 gt{WS 256 WS 0 256 getinterval putinterval
  34. dup 512 gt{WS 512 WS 0 512 getinterval putinterval dup 1024 gt{WS 1024 WS 0
  35. 1024 getinterval putinterval dup 2048 gt{WS 2048 WS 0 2048 getinterval
  36. putinterval}if}if}if}if}if}if}if}if}if}if}if}if pop pop}BD/SR{currentfile
  37. token pop dup 0 gt{WS 0 3 -1 roll getinterval currentfile exch readhexstring
  38. pop}{neg currentfile token pop 1 I RC WS 0 3 -1 roll
  39. getinterval}ifelse}BD/S1{true SMat/SR load imagemask}BD 255 2048 RC/FFs WS 0
  40. 2048 getinterval 2048 string copy def/SF{/WS2 FFs 0 4 I 7 add 8 idiv 4 I mul
  41. getinterval def true SMat{WS2}imagemask}BD/SN{8 SMat/SR load image}BD/Rem 0
  42. def/D32{currentfile Rem WS length lt{WS 0 Rem getinterval}{WS}ifelse
  43. readhexstring pop/Rem Rem WS length sub def}BD/S32{2 copy  mul 3 mul/Rem
  44. exch def 8 SMat/D32 load false 3 colorimage}BD/TS{1. exch div exch 1. exch
  45. div exch scale}BD/Fn{0.016 div exch 0.016 div exch dup/fheight ED 0. 0. 3 -1
  46. roll 0. 0. WM1 astore exch findfont exch makefont setfont}BD/Ul{GS 2 copy Ln
  47. ulpos ulthick 2. div sub 256. div fheight mul exch div dup 2 I neg mul exch
  48. 3 I mul RM 2 copy rlineto ulthick 256. div fheight mul LW 0 setlinecap St
  49. GR}BD/AC{3 -1 roll exch sub 3 I length div 4 1 roll sub 1 I length div 3 1
  50. roll}BD/Tx{M 2 I SW AC ashow}BD/JTx{M 7 I dup 4 1 roll SW AC pop exch 4 -1
  51. roll add 3 1 roll add 6 -1 roll awidthshow}BD/UTx{/ulthick ED/ulpos ED M Ul
  52. 2 I SW AC ashow}BD/UJTx{M/ulthick ED/ulpos ED Ul pop pop 7 I dup 4 1 roll SW
  53. AC pop exch 4 -1 roll add 3 1 roll add 6 -1 roll
  54. awidthshow}BD/kload{{ceiling}stopped{aload pop}{0}ifelse}BD/kproc{5 I 5 I RM
  55. 2 I{exch 256 mul  add 2 I exch 2 copy known{WM2 SCM  get kload RM  WM1
  56. SCM}{pop pop}ifelse}{pop pop}ifelse}BD/KTx{WM1 GCM GCF/FontMatrix get exch
  57. WM2 CCM pop M 2 I SW AC GCF/KernData known{GCF/KernData get true}{null
  58. false}ifelse{kproc}4 -1 roll    kshow pop pop pop pop}BD/UKTx{6 2
  59. roll/ulthick ED/ulpos ED 2 copy M   4 2 roll Ul  pop pop KTx}BD/jkproc{5 I 5
  60. I RM 1 I 7 I eq{8 I 8 I RM}if 2 I{exch 256 mul  add 2 I exch 2 copy
  61. known{WM2 SCM  get kload RM  WM1 SCM}{pop pop}ifelse}{pop
  62. pop}ifelse}BD/JKTx{WM1 GCM GCF/FontMatrix get exch WM2 CCM pop M 8 -1 roll
  63. dup 4 1 roll SW AC 5 1 roll exch 4 -1 roll add 3 1 roll add GCF/KernData
  64. known{GCF/KernData get true}{null false}ifelse{jkproc}6 -1 roll  kshow
  65. 7{pop}repeat}BD/UJKTx{2 copy M 6 2 roll/ulthick ED/ulpos ED Ul pop pop
  66. JKTx}BD/cdefs 224 8 mul string def cdefs 127 32 sub 8 mul FFs 0 8
  67. getinterval putinterval/DC{32 sub 8 mul cdefs exch 8 getinterval currentfile
  68. exch readhexstring pop pop}BD/ArcFont dup 6 dict dup begin/FontMatrix[1. 0.
  69. 0. 1. 0. -1.]def/FontType 3 def/FontBBox[0. 0. 1. 1.]def/Encoding 256 array
  70. def 0 1 255{Encoding exch/.notdef put}for/BuildChar{xgap ygap setcharwidth 8
  71. 8 true 8. 0. 0. 8. 0. 0. WM2 astore 5 -1 roll 32 sub 8 mul cdefs exch 8
  72. getinterval imagemask pop}BD end definefont def/V{GS 2 I div/ygap ED 2 I
  73. div/xgap ED 0. 0. 3 -1 roll 0. 0. WM1 astore ArcFont exch makefont setfont M
  74. show GR}BD/PAR{6 -2 roll pop pop 10 dict begin dup 0 lt/hflip ED abs/h ED
  75. dup 0 lt/wflip ED abs/w ED 256. div/uly ED 256. div/ulx ED 256. div/lry ED
  76. 256. div/lrx ED 256. div/lly ED 256. div/llx ED[lrx llx sub w div lry lly
  77. sub w div ulx llx sub h div uly lly sub h div llx lly]concat hflip{0 h T 1
  78. -1 scale}if wflip{w 0 T -1 1 scale}if end}BD/VALACC 14 dict dup begin/acute
  79. 1 def/grave 1 def/circumflex 1 def/dieresis 1 def/ring 1 def/tilde 1
  80. def/breve 1 def/caron 1 def/cedilla 1 def/dotaccent 1 def/hungarumlaut 1
  81. def/slash 1 def/macron 1 def/ogonek 1 def end def/CKN{2 copy known{get
  82. type/arraytype ne}{pop pop false}ifelse}def/OKA{2 copy known{pop pop
  83. false}{dup length dup 1 gt{string cvs dup 0 1 getinterval cvn exch 1 1 I
  84. length 1 sub getinterval cvn 3 -1 roll dup 2 I CKN exch 3 I CKN and VALACC 2
  85. I known and{true}{pop pop false}ifelse}{pop pop pop
  86. false}ifelse}ifelse}def/RF{findfont false 3 1 roll _RFE}def/_RFE{dup length
  87. dict begin{1 I/FID ne{def}{pop pop}ifelse}forall dup type/arraytype
  88. eq{/FontMatrix FontMatrix 3 -1 roll 6 array CCM def}{pop}ifelse dup
  89. type/arraytype eq  currentdict/Encoding known and{/Encoding exch
  90. def}{pop}ifelse currentdict end definefont pop}def/RFE{findfont
  91. dup/CharStrings known{RFET1}{_RFE}ifelse}def/RFET1{dup length 4 add dict
  92. begin/CBOX{newpath 0 0 M GS ifm SCM false charpath matrix SCM pathbbox
  93. currentpoint GR}BD/CHEI{CBOX pop pop 4 1 roll pop pop pop}BD/SRCH{-1
  94. exch/Encoding load   0 1 2 I length 1 sub{2 copy get 3 I eq{4 -1 roll pop 3
  95. 1 roll exit}{pop}ifelse}for pop pop dup -1 ne{1 string dup 0 4 -1 roll put
  96. true}{pop false false}ifelse}BD/MKACC{SRCH 3 -1 roll SRCH 3 -1 roll and{3
  97. dict begin/letter exch def/accent exch def/ifm/FontMatrix load matrix
  98. invertmatrix def GS matrix SCM letter CBOX 6 2 roll accent CBOX pop pop 6 -1
  99. roll 7 I sub 3 -1 roll 4 I sub sub 2 div 7 -1 roll 5 -1 roll sub add 7 1
  100. roll 0 gt{(X)CHEI(x)CHEI 2 copy add 2 div 5 -1 roll le{sub}{pop pop 0}ifelse
  101. 5 1 roll pop pop}{pop pop pop 0 3 1 roll}ifelse GR setcharwidth 0 0 M GS ifm
  102. concat letter show GR M    GS ifm concat accent show  GR end}{pop pop}ifelse
  103. pop}BD dup/CharStrings get 0 4 I{2 I exch OKA{pop pop 1 add}if}forall 3 -1
  104. roll{1 I/FID ne 2 I/CharStrings ne and{def}{pop pop}ifelse}forall 1 I length
  105. add dict exch{2 I 3 1 roll put}forall 2 I{2 copy OKA{[3 1 roll/MKACC cvx]cvx
  106. 2 I 3 1 roll put}{pop}ifelse}forall/CharStrings exch def dup type/arraytype
  107. eq{/FontMatrix FontMatrix 3 -1 roll 6 array CCM def}{pop}ifelse/Encoding
  108. exch def currentdict end definefont pop}BD end 
  109.